import java.util.Scanner;

public class Demo12 {
    public static void main(String[] args) {
        double my = 0;
        Scanner scanner = new Scanner(System.in);
        double v = scanner.nextDouble();
        if (v <= 100000){
            my = v * 0.1;
        }else if (v <= 200000){
            my = 100000 * 0.1 + (v - 100000) * 0.075;
        }else if (v <= 400000){
            my = 100000 * 0.1 + (v - 100000) * 0.075 + (v - 200000) * 0.05;
        }else if (v <= 600000){
            my = 100000 * 0.1 + (v - 100000) * 0.075 + (v - 200000) * 0.05 + (v - 400000) * 0.03;
        }else if (v <= 1000000){
            my = 100000 * 0.1 + (v - 100000) * 0.075 + (v - 200000) * 0.05 + (v - 400000) * 0.03 + (v - 600000) * 0.01;
        }else {
            my = my = 100000 * 0.1 + 100000 * 0.075 + 200000 * 0.05 + 200000 * 0.03 + 400000 * 0.015 + (v - 1000000 ) * 0.01;
        }
        System.out.printf("%.2f",my);
    }
}
